Eclipse JDT
Pre-release 3.0

org.eclipse.jdt.core
Class WorkingCopyOwner

java.lang.Object
  extended byorg.eclipse.jdt.core.WorkingCopyOwner

public abstract class WorkingCopyOwner
extends Object

The owner of an ICompilationUnit handle in working copy mode. An owner is used to identify a working copy and to create its buffer.

Clients should subclass this class to instanciate a working copy owner that is specific to their need and that they can pass in to various APIs (e.g. IType.resolveType(String, WorkingCopyOwner). Clients can also override the default implementation of createBuffer(ICompilationUnit).

Since:
3.0
See Also:
ICompilationUnit.becomeWorkingCopy(IProblemRequestor, org.eclipse.core.runtime.IProgressMonitor), ICompilationUnit.discardWorkingCopy(), ICompilationUnit.getWorkingCopy(org.eclipse.core.runtime.IProgressMonitor)

Constructor Summary
WorkingCopyOwner()
           
 
Method Summary
 IBuffer createBuffer(ICompilationUnit workingCopy)
          Creates a buffer for the given working copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkingCopyOwner

public WorkingCopyOwner()
Method Detail

createBuffer

public IBuffer createBuffer(ICompilationUnit workingCopy)
Creates a buffer for the given working copy. The new buffer will be initialized with the contents of the underlying file if and only if it was not already initialized by the compilation owner (a buffer is uninitialized if its content is null).

Parameters:
workingCopy - the working copy of the buffer
Returns:
IBuffer the created buffer for the given working copy
See Also:
IBuffer

Eclipse JDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.